import request from '@/utils/request'

// 查询备品备件货品列表
export function listProducts(query) {
  return request({
    url: '/sparepart/products/list',
    method: 'get',
    params: query
  })
}

// 查询备品备件货品详细
export function getProducts(proId) {
  return request({
    url: '/sparepart/products/' + proId,
    method: 'get'
  })
}

// 新增备品备件货品
export function addProducts(data) {
  return request({
    url: '/sparepart/products',
    method: 'post',
    data: data
  })
}

// 修改备品备件货品
export function updateProducts(data) {
  return request({
    url: '/sparepart/products',
    method: 'put',
    data: data
  })
}

// 删除备品备件货品
export function delProducts(proId) {
  return request({
    url: '/sparepart/products/' + proId,
    method: 'delete'
  })
}

// 导出备品备件货品
export function exportProducts(query) {
  return request({
    url: '/sparepart/products/export',
    method: 'get',
    params: query
  })
}
// 审核备品备件货品
export function checkProducts(data) {
  return request({
    url: '/sparepart/products/check',
    method: 'put',
    data: data
  })
}
